<?php
require_once './cc.php';

$id = $_REQUEST['id'];

$count = $_REQUEST['count'];


    $sql = "UPDATE userinfo SET count = $count WHERE id = $id";

    mysqli_query($conn, $sql);

    $rows = mysqli_affected_rows($conn);

   
    $array = array(
        'code' => 0,
        'data' => false,
    );
     if ($rows > 0) {
        $array = array(
            'code' => 1,
            'data' => true,
        );
    }

echo json_encode($array);










